<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 杭州牛之云科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com

 * =========================================================
 */

namespace app\event;

use app\model\member\Member;
use app\model\member\MemberAccount;
use app\model\member\MemberLevel;
use app\model\order\OrderCommon;
use app\model\fenxiao\Fenxiao;

/**
 * 订单完成
 */
class FenxiaoOk
{
    // 行为扩展的执行入口必须是run
    public function handle($data)
    {
       
        //订单返还积分
        $order_model       = new OrderCommon();
        $condition         = array(
            ['out_trade_no', '=', $data['out_trade_no']]
        );
        $order_info_result = $order_model->getOrderInfo($condition, '*');
        $order_info        = $order_info_result['data'];
        
        $fenxiao_model     = new Fenxiao();
        
        $fenxiao_model->ok($order_info);
    }
}